<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            padding:0px;
            margin:0px;
        }
        div{
            width: 100px;
            height: 100px;
            position: absolute;
        }
        .d1{
            background:red;
            top:300px;
            left:0px;
        }
        .d2{
            background:yellowgreen;
            top:300px;
            left:0px;
            z-index:100;
        }
        .d3{
            background:pink;
            top:300px;
            left:0px;

            /*z‐index 控制当前元素的堆叠顺序,取值：数字，数字越大越优先*/
            z-index:2;
        }
        .d4{
            background:palevioletred;
            top:300px;
            left:0px;
        }
        .d5{
            background:plum;
            top:300px;
            left:0px;

        }
    </style>
</head>
<body>
    <div class="d1"></div>
    <div class="d2"></div>
    <div class="d3"></div>
    <div class="d4"></div>
    <div class="d5"></div>
</body>
</html>